#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<cstdio>

using namespace std;

int main()
{
    int n, x;
    cin >> n;
    while (n--)
    {
        long long a = 0, b = 1, c;
        cin >> x;
        for (int i = 0; i < x; i++)
        {
            c = a + b;
            a = b;
            b = c;
        }
        printf("Fib(%lld) = %lld\n", x, a);
    }
    return 0;
}

